<template>
  <div>
    我是父组件{{ name }}=={{ attrs.msg }}
    <Son v-bind="attrs"></Son>
    <button @click="attrs.onAdd">我来执行父组件方法</button>
    <el-dialog v-bind="$attrs" :close-on-click-modal="false">
      <button @click="attrs.onOopen">关闭弹窗</button>
    </el-dialog>

  </div>
</template>

<script  setup>

import Son from "@/components/son/index.vue"
const props = defineProps({
    name: {
        type: String,
        default: '我是默认值'
  } ,

})
import { useAttrs } from 'vue'

const attrs = useAttrs()
console.log(attrs,'father');


</script>


<style lang="less" scoped>

</style>